import math
import sys

from matplotlib import pyplot as plt

from arithmetic_part import Sparrow
sys.path.append("..")
if __name__ == '__main__':

    '''Sparrow顺序 9个参数含义
        dim =   # 维度
        pq =   # 总群数量
        iter_num =   # 迭代次数
        ST =   # 发现者警戒阈值[0.5,1.0]
        PR =   # 发现者比例
        SD =   # 侦察者比例
        data_range_max =   # 取值范围
        data_range_min =   # 取值范围
        ty =   # # 最佳函数是最大还是最小值
        '''
    for i in range(30):
        # SSA = Sparrow(2, 100, 100, 0.7, 0.3, 0.3, 0, math.pi, 1)
        SSA = Sparrow(4, 40, 40, 0.6, 0.2, 0.1, 0, math.pi, 0)
        print(SSA.SSA_course())
